import { _decorator, Component, director, Node } from 'cc';
import EventManager from '../../Runtime/EventManger';
import { CONTROLLER_ENUM, EVENT_ENUM, SCENE_ENUM } from '../../Enums';
import FaderManager from '../../Runtime/FaderManager';
const { ccclass, property } = _decorator;

@ccclass('StartManager')
export class StartManager extends Component {

  onLoad(){
    FaderManager.Instance.fadeOut(1000)
    this.node.once(Node.EventType.TOUCH_END,this.handleStart,this)
  }

  start(){

  }

  async handleStart(){
    await FaderManager.Instance.fadeIn(300)
    console.log('跳转场景')
    director.loadScene(SCENE_ENUM.Battle)
  }
}


